var api = require('../../utils/api.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    list:[],
    score:'',
    size:10,
  },
  onLoad: function (options) {
    let that=this
    that.setData({
      score: options.score
    })
    api.integralDetailsList({
     
      page:{
        size:that.data.size
      }
    }).then(res => {
      if (res.result){
         that.setData({
           list: res.object.records
         })
      }
    })
  },
  //上滑加载
  onReachBottom:function(){
    let that = this
    let size=that.data.size
    size=size+10
    api.integralDetailsList({

      page: {
        size: size
      }
    }).then(res => {
      if (res.result) {
        that.setData({
          list: res.object.records,
          size
        })
      }
    })
  }
})